package cn.com.api.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiU_template;
import cn.com.api.mapper.ApiU_templateMapper;
import cn.com.api.service.ApiU_templateService;
import cn.com.api.service.impl.base.U_templateServiceImplBase;

/**
 * 
 **/
@Service
public class ApiU_templateServiceImpl extends U_templateServiceImplBase implements ApiU_templateService {
	@Autowired
	private ApiU_templateMapper apiU_templateMapper;

	// 新增对象后返回记录ID
	public int U_templateInsertion(ApiU_template u_template) {
		return this.apiU_templateMapper.U_templateInsertion(u_template);
	}

	@Override
	public int insertU_template_info(ApiU_template u_template) {
		// TODO Auto-generated method stub
		return apiU_templateMapper.insertU_template_info(u_template);
	}

	@Override
	public ApiU_template findU_templateByTemplateId(Integer valueOf) {
		// TODO Auto-generated method stub
		return apiU_templateMapper.findU_templateByTemplateId(valueOf);
	}

	@Override
	public int updateU_template_info(ApiU_template u_template) {

		int ret_I = apiU_templateMapper.updateU_template_info(u_template);
		return ret_I;

	}

	@Override
	public List<Map<String, Object>> findU_templates_type(String type) {
		// TODO Auto-generated method stub
		return apiU_templateMapper.findU_templates_type(type);
	}

	@Override
	public int deleteU_template_info(Integer template_id) {
		// TODO Auto-generated method stub
		return apiU_templateMapper.deleteU_template_info(template_id);
	}

	public List<ApiU_template> findTemplatesByType(@Param("type") String type) {
		return apiU_templateMapper.findTemplatesByType(type);
	}
}
